unit inssOpeSelecionarPasta;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ULibFormularioConfirmarCancelarBase, ActnList, ImgList, Buttons,
  StdCtrls, pngimage, jpeg, ExtCtrls, FileCtrl;

type
  TfrmOpeSelecionarPasta = class(T_libFormularioConfirmarCancelarBase)
    dlbPath: TDirectoryListBox;
    Panel1: TPanel;
    SpeedButton2: TSpeedButton;
    dcbPath: TDriveComboBox;
    procedure actnConfirmExecute(Sender: TObject);
    procedure actnFecharExecute(Sender: TObject);
    procedure dlbPathClick(Sender: TObject);
  private
    FPath: String;
    procedure SetPath(const Value: String);
    { Private declarations }
  public
    { Public declarations }
    property Path: String read FPath write SetPath;
  end;

var
  frmOpeSelecionarPasta: TfrmOpeSelecionarPasta;

implementation

{$R *.dfm}

procedure TfrmOpeSelecionarPasta.actnConfirmExecute(Sender: TObject);
begin
  inherited;
  Self.Path := ExtractFilePath(dlbPath.Directory+'\');
  Self.Close;
end;

procedure TfrmOpeSelecionarPasta.actnFecharExecute(Sender: TObject);
begin
  Self.Path := '';
  inherited;
end;

procedure TfrmOpeSelecionarPasta.dlbPathClick(Sender: TObject);
begin
  inherited;
  dlbPath.Directory := dlbPath.GetItemPath(dlbPath.ItemIndex);
end;

procedure TfrmOpeSelecionarPasta.SetPath(const Value: String);
begin
  FPath := Value;
end;

end.
